How can a computer, which is capable of executing only programs written in binary machine language, run a program in a "high-level" language, such as JavaScript? The following lab exercises will demonstrate for you how a translator can convert code written by human programmers into machine executable commands.

Lab 6.1: Representations
Lab 6.2: Parsing Out
Lab 6.3: Generating Code
Lab 6.4: Symbols and Bits
  1. Introduce the binary representation of information used by modern computers
  2. Show how program statements can be translated into machine language using parse trees
  3. Introduce several contemporary high-level languages, concentrating on how they make the programming process more efficient
  4. Take a brief look at the problems involved in translating high-level languages into executable instructions
Module Quiz

Print
References

The text portion of this module addresses the question of how a computer which understands binary1 machine language2 can execute the kind of instructions we write in high-level programming languages3, like JavaScript4, detailed in Module 5. The answer, of course, is that it turns programs on themselves, to serve as translators. The structure and typical content of these different languages, as well as the techniques employed by the translator programs, are the focus of this module.

1pp. 203–205, 243, 273–274, 282
2pp. 210, 216
3pp. 16, 126, 218-220
4pp. 126, 127, 139–196, 149

Like modern translator programs, the Rosetta Stone accomplished its translation in stages (converting hieroglyphics, first into demotic, and then into Greek). Replace hieroglyphic with high-level programming language, demotic with assembly language, and Greek with machine language, and you've got a reasonable model for how modern computers implement modern programming languages. Thus, the Rosetta Stone serves as an effective metaphor for this module.

MODULES:


Search Resources Objectives Feedback Order Form Credits Print Book


Copyright Notice
© 1998 PWS Publishing Company, All Rights Reserved.